package com.jason.quectel;

/**
 * @author：Jason
 * @date：2022/3/8 16:55
 * @email：1129847330@qq.com
 * @description:
 */
public abstract class Machine implements MachineMustFunction {
    protected String branch;
    protected float price;

    public Machine(String branch, float price) {
        this.branch = branch;
        this.price = price;
    }

    public void start() {
        int electric = getElectric();
        if (electric == 220) {
            System.out.println("符合我国标准");
            work();
        } else {
            System.out.println("不符合我国标准，不允许使用");
        }
    }

    protected abstract void work();
}